﻿<!--
//===============================================================================
// Microsoft Architecture Strategy Team
// LitwareHR - S+S Sample Application
//===============================================================================
// Copyright  Microsoft Corporation.  All rights reserved.
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
// LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
// FITNESS FOR A PARTICULAR PURPOSE.
//===============================================================================
// The example companies, organizations, products, domain names,
// e-mail addresses, logos, people, places, and events depicted
// herein are fictitious.  No association with any real company,
// organization, product, domain name, email address, logo, person,
// places, or events is intended or should be inferred.
//===============================================================================
-->

<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="LitwareHR.PublicApp.WinUX.LoginView" BorderThickness="0,0,0,0" Margin="0,0,0,0" Width="355" Height="250" Background="{DynamicResource PageBackgroundBrush}" Opacity="1">
	<UserControl.Resources>
		<Style x:Key="GlassyButtonStyle" BasedOn="{x:Null}" TargetType="{x:Type Button}">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<ControlTemplate.Resources>
							<Storyboard x:Key="Timeline1">
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ButtonBase" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
									<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF008EB5"/>
									<SplineColorKeyFrame KeyTime="00:00:00.1280000" Value="#FF00C8FF"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
							<Storyboard x:Key="Timeline2">
								<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetProperty="(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="ButtonBase">
									<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF00C8FF"/>
									<SplineColorKeyFrame KeyTime="00:00:00.2520000" Value="#FF008EB5"/>
								</ColorAnimationUsingKeyFrames>
							</Storyboard>
						</ControlTemplate.Resources>
						<Grid>
							<Rectangle Stroke="{x:Null}" RadiusX="5" RadiusY="5" x:Name="Reflection" Margin="0,0,0,-20.646" VerticalAlignment="Bottom" Height="18">
								<Rectangle.Fill>
									<LinearGradientBrush EndPoint="0.497,0.515" StartPoint="0.499,-0.119">
										<GradientStop Color="#2DFFFFFF" Offset="0"/>
										<GradientStop Color="#00FFFFFF" Offset="1"/>
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
							<Rectangle Stroke="{x:Null}" RadiusX="5" RadiusY="5" Margin="0,1,0,-1" x:Name="ButtonBase">
								<Rectangle.Fill>
									<LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
										<GradientStop Color="#FF00598C" Offset="0"/>
										<GradientStop Color="#FF008EB5" Offset="1"/>
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
							<Rectangle Stroke="{x:Null}" RadiusX="5" RadiusY="5" Margin="0,0.999,0,-0.999" x:Name="GlassyTop"> 
								<Rectangle.Fill>
									<LinearGradientBrush EndPoint="0.496,0.626" StartPoint="0.5,-0.008">
										<GradientStop Color="#4CFFFFFF" Offset="0"/>
										<GradientStop Color="#00FFFFFF" Offset="1"/>
									</LinearGradientBrush>
								</Rectangle.Fill>
							</Rectangle>
							<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" Margin="10,1,10,1" TextElement.Foreground="White" />
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsFocused" Value="True"/>
							<Trigger Property="IsDefaulted" Value="True"/>
							<Trigger Property="IsMouseOver" Value="True">
								<Trigger.EnterActions>
									<BeginStoryboard Storyboard="{StaticResource Timeline1}"/>
								</Trigger.EnterActions>
								<Trigger.ExitActions>
									<BeginStoryboard x:Name="Timeline2_BeginStoryboard" Storyboard="{StaticResource Timeline2}"/>
								</Trigger.ExitActions>
							</Trigger>
							<Trigger Property="IsPressed" Value="True"/>
							<Trigger Property="IsEnabled" Value="False"/>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>
	<Canvas x:Name="LayoutRoot" Width="345" Height="253">
		<StackPanel Margin="5">
			<Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" CornerRadius="0,10,0,0" Background="{DynamicResource HeaderBrush}">
				<TextBlock Margin="10,3,3,3" Background="#00FFFFFF" FontSize="13" Foreground="#FFFFFFFF" Text="Login" />
			</Border>
			<Border Width="335" Margin="0,5,0,0" Height="185" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1" CornerRadius="0,0,10,0" Panel.ZIndex="5">

				<Border.Background>
					<LinearGradientBrush EndPoint="0.994,0.012" StartPoint="0.006,0.988">
						<GradientStop Color="#FF1E1941" Offset="0"/>
						<GradientStop Color="#1952778A" Offset="1"/>
					</LinearGradientBrush>
				</Border.Background>

				<Grid Margin="5,10,5,5" Height="130" VerticalAlignment="Top">
					<Grid.ColumnDefinitions>
						<ColumnDefinition Width="120" />
						<ColumnDefinition />
					</Grid.ColumnDefinitions>
					<Grid.RowDefinitions>
						<RowDefinition/>
						<RowDefinition/>
						<RowDefinition/>
						<RowDefinition/>
						<RowDefinition/>
					</Grid.RowDefinitions>
					<TextBlock Name ="txtMessageBox" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Width="300" Foreground="#FFE3EA20" FontSize="11" TextWrapping="Wrap" HorizontalAlignment="Center" TextAlignment="Center" />
					<TextBlock Foreground="White" Text="Tenant Alias" FontSize="12" x:Name="txtTenantText" Grid.Column="0" HorizontalAlignment="Right" Grid.Row="1" VerticalAlignment="Center" Margin="0,0,10,0"/>
					<TextBox Grid.Column="1" TextWrapping="Wrap" x:Name="txtTenantTextBox" ToolTip="Enter Tenant Name." Grid.Row="1" VerticalAlignment="Center" Width="150" HorizontalAlignment="Left"/>
					<TextBlock Grid.Row="2" Foreground="White" Text="User Name" FontSize="12" x:Name="txtUserText"  Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,10,0"/>
					<TextBox Grid.Column="1" Grid.Row="2" TextWrapping="Wrap" x:Name="txtUserTextBox" ToolTip="Enter User Name."  VerticalAlignment="Center" Width="150" HorizontalAlignment="Left"/>
					<TextBlock Grid.Row="3" Foreground="White" Text="Password" FontSize="12" HorizontalAlignment="Right" x:Name="txtPasswordText"   Grid.Column="0" VerticalAlignment="Center" Margin="0,0,10,0"/>
					<PasswordBox Grid.Column="1" Grid.Row="3" x:Name="txtPasswordTextBox" ToolTip="Enter Password."  VerticalAlignment="Center" Width="150" HorizontalAlignment="Left"/>
					<Button Style="{DynamicResource GlassyButtonStyle}" FontSize="12" Grid.Column="1" Grid.Row="4" Content="Login" x:Name="btnSubmit" HorizontalAlignment="Left" VerticalAlignment="Center" DockPanel.Dock="Left" Width="60" Height="20"/>
				</Grid>
			</Border>
		</StackPanel>
		<!-- Glassy Effect for Header -->
		<Border BorderBrush="{x:Null}" BorderThickness="1" CornerRadius="0,10,0,0" Background="{DynamicResource GlassyEffectBrush}" Width="335" Height="23.69" Canvas.Left="5" Canvas.Top="4"/>
		<Image Source="../../Images/login-connected.gif" Height="45" Width="88" Canvas.Left="218" Canvas.Top="159.69" x:Name="image"/>
		
		<!-- Mask Over Reflection -->
		<Rectangle Name="MaskOverReflection"  Opacity="1" RenderTransformOrigin="0.5,0.5" Fill="#FF31245A" Stroke="{x:Null}" Width="88" Height="30.049" Canvas.Left="233" Canvas.Top="218.666" Panel.ZIndex="-1">
			<Rectangle.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="1" ScaleY="-1"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</Rectangle.RenderTransform>
		</Rectangle>
		<!-- Earth Reflection -->
		<Rectangle x:Name="EarthReflection" Opacity="0.25" RenderTransformOrigin="0.5,0.5" Fill="{DynamicResource Reflection}" Stroke="{x:Null}" Width="88" Height="45" Canvas.Left="218" Canvas.Top="203" Panel.ZIndex="-2">
			<Rectangle.Resources>
				<ResourceDictionary>
					<ResourceDictionary.MergedDictionaries>
						<ResourceDictionary Source="..\Skins\BaseSkin.xaml"/>
					</ResourceDictionary.MergedDictionaries>
				</ResourceDictionary>
			</Rectangle.Resources>
			<Rectangle.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="1" ScaleY="-1"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</Rectangle.RenderTransform>
		</Rectangle>
	</Canvas>
</UserControl>

